﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ebc.viz.contracts {
using Microsoft.Msagl.Drawing;
using data.contracts;
using data.contracts.messages;
using ebcpatterns.flow;
using modelbuilder;
public interface IValidate_commandline_params {
  event Action<string[]> VisualizeProject;
  event Action<string[]> VisualizeBoard;
  void Process(string[] message);
}
public interface ICollect_board_definitions_from_project {
  event Action<string[]> Filenames;
  void Process(string[] message);
}
public interface IRender_boards {
  event Action<Graph[]> Graphs;
  void Process(IEnumerable<Board> message);
}
public interface IFrontend {
  void DisplayGraphs(Graph[] message);
}
public interface IMainBoard {
  void Run(string[] message);
}
public partial class MainBoard : IMainBoard {

  private Action<string[]> _Run;
  public void Run(string[] message) {
    _Run(message);
  }
  public MainBoard(IValidate_commandline_params Validate_commandline_params, ICollect_board_definitions_from_project Collect_board_definitions_from_project, IMap<string[],BuildBoardsMessage> Mapper, ModelBuilder ModelBuilder, IRender_boards Render_boards, IFrontend Frontend) {
    this._Run += Validate_commandline_params.Process;
    Validate_commandline_params.VisualizeProject += Collect_board_definitions_from_project.Process;
    Collect_board_definitions_from_project.Filenames += Mapper.Input;
    Mapper.Output += ModelBuilder.Process;
    ModelBuilder.Result += Render_boards.Process;
    Render_boards.Graphs += Frontend.DisplayGraphs;
    Validate_commandline_params.VisualizeBoard += Mapper.Input;
  }
}

}
